﻿@page
@{ Layout = "_Layout"; }
@section Styles{
  <link href="/sitefiles/assets/css/cloud.css" rel="stylesheet" type="text/css" />
  <style>
    .el-upload, .el-upload-dragger {
        width: 150px;
    }
  </style>
}

<el-row :gutter="20">
  <el-col :span="18" :offset="3">
    <div style="height: 25px"></div>
    <el-card class="box-card">
      <template #header>
        <div class="clearfix">
          <span>后台版权设置</span>
          <el-button type="primary" v-on:click="btnSubmitClick" size="small" style="float: right; margin-top: -5px;">
            保存设置
          </el-button>
        </div>
      </template>
      <div class="text">
        
        <el-form v-on:submit.native.prevent ref="form" :model="form" size="small" status-icon label-position="top">

          <el-switch
            v-model="form.isCloudAdmin"
            active-text="启用后台版权设置"
          ></el-switch>
          <div class="tips" style="margin-top: 10px;">
            后台版权设置能够实现内容变更通知以及表单提交等情景下的后台版权设置功能。
            <el-link
              :underline="false"
              href="https://sscms.com/docs/v7/handbook/clouds/mail/"
              target="_blank"
              icon="el-icon-info"
            >
              了解更多
            </el-link>
          </div>

          <template v-if="form.isCloudAdmin">
            <div style="height: 10px"></div>
            <el-divider></el-divider>
            <div style="height: 10px"></div>

            <el-form-item label="管理后台名称" prop="adminTitle" :rules="{ required: true, message: '请输入管理后台名称' }">
              <el-input v-model="form.adminTitle"></el-input>
              <small class="tips">设置管理后台显示名称</small>
            </el-form-item>
            <el-form-item label="管理后台Favicon">
              <el-upload
                :action="uploadUrlFavicon"
                :file-list="uploadFaviconList"
                :headers="{Authorization: 'Bearer ' + $token}"
                list-type="picture-card"
                :before-upload="uploadBefore"
                :on-progress="uploadProgress"
                :on-success="uploadSuccess"
                :on-error="uploadError"
                :on-remove="uploadFaviconRemove"
                :multiple="false">
                <i class="el-icon-plus"></i>
              </el-upload>
            </el-form-item>
            <el-form-item label="管理后台Logo">
              <el-upload
                :action="uploadUrlLogo"
                :file-list="uploadLogoList"
                :headers="{Authorization: 'Bearer ' + $token}"
                list-type="picture-card"
                :before-upload="uploadBefore"
                :on-progress="uploadProgress"
                :on-success="uploadSuccess"
                :on-error="uploadError"
                :on-remove="uploadLogoRemove"
                :multiple="false">
                <i class="el-icon-plus"></i>
              </el-upload>
            </el-form-item>
            <el-form-item label="管理后台Logo链接地址">
              <el-input v-model="form.adminLogoLinkUrl"></el-input>
            </el-form-item>
            <el-form-item label="管理后台欢迎语">
              <el-input v-model="form.adminWelcomeHtml" type="textarea"></el-input>
              <small class="tips">请填写进入管理后台后显示的欢迎文字，支持HTML格式。</small>
            </el-form-item>
          </template>
        </el-form>

      </div>
    </el-card>
  </el-col>
</el-row>

@section Scripts{
<script src="/sitefiles/assets/js/admin/clouds/admin.js" type="text/javascript"></script> }